﻿using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SlaughterItem.API.Application.Commands.Week02.Check_In;
using SlaughterItem.API.Application.Commands.Week02.LiveAnimalsa;
using SlaughterItem.Common.Dtos;

namespace SlaughterItem.API.Controllers.WangHaoQi
{
    /// <summary>
    /// 活畜秤重 控制器 写
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class LiveAnimalsController : ControllerBase
    {
        private readonly IMediator mediatora;

        public LiveAnimalsController(IMediator mediatora)
        {
            this.mediatora = mediatora;
        }
        /// <summary>
        /// 活畜秤重添加
        /// </summary>
        /// <param name="cmd"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<Result> LiveAnimalsAdd(LiveAnimalsAddCommand cmd)
        {
            return await mediatora.Send(cmd);
        }
        
    }
}
